/*
 * @Descripttion: 文件说明
 * @version: V1.0
 * @Author: GW
 * @Date: 2021-07-29 10:40:41
 * @LastEditors: GW
 * @LastEditTime: 2021-09-01 10:56:27
 */
import { axios } from "../../utils/request";

const api = {
    pageList: "/work/planSummary/pageList",
    save: "/work/planSummary/save",
    delete: "/work/planSummary/delete",
    submit: "/work/planSummary/submit",
    approval: "/work/planSummary/approval",
    planContent: "/work/planSummary/getPlanContent",
    returnPlan: "/work/planSummary/returnPlan",
    saveEvaluation: "/work/planSummary/saveEvaluation",
    finish: "/work/planSummary/finish",//存档
};

/**
 * 列表
 */
export function pageList (parameter) {
    return axios({
        url: api.pageList,
        method: "get",
        params: parameter
    });
}

/**
 * 保存
 */
export function save (parameter) {
    return axios({
        url: api.save,
        method: "post",
        data: parameter
    });
}

/**
 * 删除
 */
export function deleteSummary (parameter) {
    return axios({
        url: api.delete,
        method: "post",
        data: parameter
    });
}

/**
 * 报送计划/总结
 */
export function submitWorkSummary (data) {
    return axios({
        url: api.submit,
        method: "post",
        data: data
    });
}

/**
 * 审核计划/总结
 */
export function approval (data) {
    return axios({
        url: api.approval,
        method: "post",
        data: data
    });
}

/**
 * 获取计划内容列表
 */
export function getPlanContent (data) {
    return axios({
        url: api.planContent,
        method: "get",
        params: data
    });
}

/**
 * 撤回
 */
export function returnPlan (data) {
    return axios({
        url: api.returnPlan,
        method: "post",
        data: data
    });
}

/**
 * 保存评价
 */
export function readWorkSummary (data) {
    return axios({
        url: api.saveEvaluation,
        method: "post",
        data: data
    });
}
/**
 * 存档
 */
export function finishApi (data) {
    return axios({
        url: api.finish,
        method: "post",
        data: data
    });
}
